import React from 'react'
import {Layout} from 'antd'
import {withRouter} from 'react-router-dom'
import NavMenu from '../common/nav-menu'
import LeftMenu from '../common/left-menu'

const { Content, Sider } = Layout

const defaultSidebars = [
  {
    name: '系列管理',
    icon: 'database',
    linkTo: '/serials-management'
  },
  {
    name: '视频管理',
    icon: 'youtube',
    linkTo: '/videos-management'
  },
  {
    name: '申请处理',
    icon: 'contacts',
    linkTo: '/applications-management'
  }
]

class ManagementLayout extends React.Component {
  render () {
    return <div>
      <NavMenu />
      <Layout>
        <Sider style={{ background: '#fff' }}>
          <LeftMenu sidebars={defaultSidebars} />
        </Sider>
        <Content style={{
          background: '#fff', paddingLeft: 32
        }}>
          {
            this.props.children
          }
        </Content>
      </Layout>
    </div>
  }
}

export default withRouter(ManagementLayout)
